package com.kkb.controller;

import com.github.pagehelper.PageInfo;
import com.kkb.service.GameService;
import com.kkb.vo.GameVO;
import com.kkb.vo.PageParam;
import com.kkb.vo.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Game API
 *
 * @author ztranscript 2021/9/2 20:28
 **/
@RestController
@RequestMapping("/game")
public class GameController {
    @Autowired
    private GameService gameService;

    @GetMapping("/list")
    public ResultVO<GameVO> list(GameVO gameVO, PageParam pageParam) {
        PageInfo<GameVO> pageList = gameService.pageList(gameVO, pageParam);
        return new ResultVO<>(pageList);
    }
}
